-
-
Notifications
You must be signed in to change notification settings - Fork 91
fix: Handle empty message content for suggestion threads #1265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Ensures a fallback thread title is provided when the original message content is empty. The thread title will now default to the message author's name in such cases, preventing empty or uninformative thread titles. Co-authored-by: billpapat <50835814+billpapat@users.noreply.github.com> Co-authored-by: Chris Sdogkos <work@chris-sdogkos.com> Mentored-by: Chris Sdogkos <work@chris-sdogkos.com>
CI/CD is failing without this commit. Co-authored-by: billpapat <50835814+billpapat@users.noreply.github.com> Co-authored-by: Chris Sdogkos <work@chris-sdogkos.com> Mentored-by: Chris Sdogkos <work@chris-sdogkos.com>
14121b8
to
629ac8c
Compare
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+ what @Zabuzard suggested. We should prioritize code readability.
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
1) Created channels without title will default to "username's suggestions" 2) Change String threadTitle to final 3) ThreadTitle logic implemented in a helper method Co-authored-by: Ethan McCue <5004262+bowbahdoe@users.noreply.github.com>
application/src/main/java/org/togetherjava/tjbot/features/basic/ThreadTitle.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/ThreadTitle.java
Outdated
Show resolved
Hide resolved
Addresses code review by @christolis. Co-authorized-by: Chris Sdogkos <work@chris-sdogkos.com> Signed-off-by: Chris Sdogkos <work@chris-sdogkos.com> Signed-off-by: billpapat <50835814+billpapat@users.noreply.github.com>
application/src/main/java/org/togetherjava/tjbot/features/basic/ThreadTitle.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/togetherjava/tjbot/features/basic/SuggestionsUpDownVoter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could u add some screenshots to the PR please that showcase/demo the feature in practice? its always difficult to review these things when u cant see how it actually looks in practice. often one also spots improvement opportunities that way 🙂
code-wise everything is fine by me now 👍
Ensures a fallback thread title is provided when the original message content is empty. The thread title will now default to the message author's nickname in such cases, preventing empty or uninformative thread titles. Closes #1198